Mega Code Archive
Regular Expressions
1) $ a dollar sign is another anchoring operator and matches only the end of a string
2) (match zero or more repetitions)
3) [
4) [whatever]
5) ^ anchoring operator and matches the beginning of a string
6) +
7) A match for any vowel followed by an r or p
8) A repeat operator
9) Add anchors or wildcard match characters as need be
10) Any match for a non-zero to nine returns all rows because all rows have a non-digit
11) Apecify any series of letters and find matches, just like INSTR
12) Asking for a match for a capital F followed by any character
13) Caret (^) may be either an anchor or a negating marker
14) Change a dollar sign to a blank space
15) Findthe's'andignorecase
16) Group the letters ir together by putting them in parentheses
17) If we wanted a non-(g or p) followed by something else like an l
18) Match description where there were no digits at all anywhere in the string
19) Matches anything
20) Matchexactlyzerooronerepetition
21) NOT REGEXP_LIKE(description,[[
22) Parenthesize both expressions
23) Ranges (Minus Signs)
24) REGEXP_INSTR function in where clause
25) REGEXP_INSTR(abc,d)
26) REGEXP_INSTR(abc,d,1,1,1)
27) REGEXP_INSTR(description, e +e)
28) REGEXP_INSTR(description,[
29) REGEXP_INSTR(description,[[
30) REGEXP_INSTR(description,[aeiou][aeiou])
31) REGEXP_INSTR(description,[aeiou]{2,3})
32) REGEXP_INSTR(description,[aeiou]{3,5})
33) REGEXP_INSTR(description,e e)
34) REGEXP_INSTR(description,ee) 0
35) REGEXP_INSTR(description,F )
36) REGEXP_INSTR(description,i i)
37) REGEXP_INSTR(Mississippi, si, 1,2,0,i)
38) Regexp_instr (string, pattern)
39) Regexp_instr (string, pattern, position, occurence, return-option)
40) Regexp_instr (string, pattern, position, occurence, return-option, parameters)
41) Regexp_instr function summary
42) Regexp_instr(comments, [^ ]+, 1, 9)
43) REGEXP_LIKE
44) REGEXP_LIKE(first_name, ^j, i)
45) REGEXP_LIKE(TO_CHAR(start_date, YYYY), ^199[5-8]$)
46) Regexp_like(comments, ([[
47) REGEXP_REPLACE(H1234 H4321 H2345,( ) ( ) ( ),3, 2 1)
48) REGEXP_REPLACE(Mississippi, si, SI, 1, 0, i)
49) REGEXP_REPLACE(Oracle www java2s com, l[[
50) REGEXP_REPLACE(This is a test, t +t,XYZ)
51) REGEXP_SUBSTR(a,ab+)
52) REGEXP_SUBSTR(abbbb,ab) (2)
53) REGEXP_SUBSTR(abbbb,ab+)
54) REGEXP_SUBSTR(description,e e)
55) REGEXP_SUBSTR(description,irdirs)
56) REGEXP_SUBSTR(Mississippi, si, 1, 2, i)
57) REGEXP_SUBSTR(www java2s com Oracle,l[[
58) REGEXP_SUBSTR(Yababa dababa do,(ab))
59) REGEXP_SUBSTR(Yababa dababa do,(ab)1)
60) REGEXP_SUBSTR(Yababa dababa do,(ab)1), backreference option
61) REGEXP_SUBSTR(Yababa dababa do,a a)
62) Repetition operator would say, at least m times with {m,}
63) Return-option is set to 1 to indicate the end of the found pattern
64) Returns the position of the second occurrence that matches the letter o starting at position 10
65) Select only addresses that contain vowels
66) Simple demo for REGEXP_INSTR
67) Specify the string using logical OR
68) Suppose we want to find any row where there are digits or lack of digits
69) The simplest regular expression matches letters, letter for letter
70) To see the difference between and +
71) Use the negating caret
72) Use the negating caret(not)
73) Use the non-greedy
74) Using backreference